#ifndef FORMATINFO_H
#define FORMATINFO_H

#include <vector>

namespace qrcode{

class FormatInfo
{
private:
    char errorlevel;
    int masknum;

    std::vector<int> maskBits15_5;  //掩模数据串

    std::vector<int> formatbitstream;

    std::vector<int> GetInitFormatInfo();
    std::vector<int> GetLevelNum(char &errorlevel);
    std::vector<int> GetMaskNum(int &masknum);

    void ConnectBits(std::vector<int> &vec, std::vector<int> &vec1);
    void XOR(std::vector<int> &vec, std::vector<int> &vec1);

public:
    FormatInfo();
    void Creator();

    void RemoveMask(std::vector<int> &vec);

    void setErrorlevel(char value);
    void setMasknum(int value);
    std::vector<int> getFormatbitstream() const;
};

}

#endif // FORMATINFO_H
